<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->get('basic', 'BasicController@index');
    $router->post('basic/range', 'BasicController@range');
    $router->post('basic/echarts', 'BasicController@echarts');
    $router->group(['prefix' => 'general'],function (Router $router){
        $router->resource('config', 'ConfigController');
    });

    $router->resource('user', 'UserController');
    $router->resource('user-address', 'UserAddressController');
    $router->resource('user-member', 'UserMemberController');

    $router->resource('banner', 'BannerController');
    $router->resource('article', 'ArticleController');
    $router->resource('money', 'MoneyController');
    $router->resource('car-brand', 'CarBrandController');
    $router->resource('news', 'NewsController');
    $router->resource('user-car', 'UserCarController');

    $router->resource('shop', 'ShopController');
    $router->resource('business', 'BusinessController');
    $router->resource('business-category', 'BusinessCategoryController');

    $router->resource('worker', 'WorkerController');
    $router->resource('service-category', 'ServiceCategoryController');
    $router->resource('service', 'ServiceController');
    $router->resource('service-order', 'ServiceOrderController');
    $router->resource('order-commission', 'OrderCommissionController');

    $router->resource('coupon', 'CouponController');
    $router->resource('user-coupon', 'UserCouponController');

    $router->resource('card', 'CardController');
    $router->resource('user-card', 'UserCardController');

    $router->resource('agent', 'AgentController');
    $router->resource('category', 'CategoryController');
    $router->resource('good', 'GoodController');
    $router->resource('good-order', 'GoodOrderController');
    $router->resource('cash-order', 'CashOrderController');
    $router->resource('user-bank', 'UserBankController');


});
